package net.thxjj.adminServer.entity.aep;


import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import net.thxjj.adminServer.entity.LoginHadleEvent;
import org.springframework.data.mongodb.core.mapping.Document;

@Document(collection="th_smoke_log")//集合名
@Data
@Accessors(chain = true)
@NoArgsConstructor
@AllArgsConstructor
public class SmokeData implements Comparable<SmokeData>{
    private String deviceId;
    private long timestamp;
    private long tx_Power;
    private long snr;
    private long smoke_value;
    private long smoke_state;
    private long signalPower;
    private long cell_ID;
    private long battery_value;


    @Override
    public String toString() {
        return "SmokeData{" +
                "deviceId='" + deviceId + '\'' +
                ", timestamp=" + timestamp +
                ", tx_Power=" + tx_Power +
                ", snr=" + snr +
                ", smoke_value=" + smoke_value +
                ", smoke_state=" + smoke_state +
                ", signalPower=" + signalPower +
                ", cell_ID=" + cell_ID +
                ", battery_value=" + battery_value +
                '}';
    }

    @Override
    public int compareTo(SmokeData o) {
        return Long.compare(this.getTimestamp(), o.getTimestamp());
    }
}
